package com.pronhub.luowowo.search.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.pronhub.luowowo.search.domain.StrategyTemplate;
import com.pronhub.luowowo.search.domain.UserInfoTemplate;
import com.pronhub.luowowo.search.repository.UserInfoTemplateRepository;
import com.pronhub.luowowo.search.service.IUserInfoSearcheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;

import java.util.List;

@Service
public class UserInfoTemplateSearchServiceImpl implements IUserInfoSearcheService{

    @Autowired
    private UserInfoTemplateRepository repository;
    @Autowired
    private ElasticsearchTemplate template;

    @Override
    public void saveOrUpdate(UserInfoTemplate userInfoTemplate) {
        repository.save(userInfoTemplate);
    }

    @Override
    public List<UserInfoTemplate> getByDestName(String keyword) {
        return repository.findByDestName(keyword);
    }
}
